package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/hello")
public class HelloController {

    //http://localhost:8080/hello/hello1
    @RequestMapping("/hello1")
    public String hello1(){
        //接收请求中的参数

        //调用service层的对象，进行业务处理
        System.out.println("hello1 被调用了......");

        //返回响应
        return "/index.jsp";//通过视图解析器后，会变成 /index.jsp
    }
    @RequestMapping("/hello2")
    public String hello2(){
        System.out.println("hello2 被调用了......");
        return "/hello.jsp";
    }

    @RequestMapping("/hello3")
    public String hello3(){
        System.out.println("hello3 被调用了......");
        return "/user/userlist.jsp";
    }
}
